#include<iostream>
#include<memory>

#define USE_DEBUG
#include"HttpServer.hpp"

void manual(const std::string& bin)
{
  printf("格式使用(format usage):%s port\n",bin.c_str());
  exit(0);
}
int main(int argc,char* argv[])
{
  if(argc != 2)
  {
    manual(argv[0]);
  }

  std::shared_ptr<HttpServer> hs(new HttpServer(atoi(argv[1])));
  hs->initserver();
  hs->Loop();
  

  return 0;
}
